package com.itheima;
//a+b=8,b+c=10,d-c=6,a+d=14
public class Nesting {
    public static void main(String[] args) {
        int a,b,c,d;
        for ( a=0; a < 8; a++) {
            for ( b=0; b < 10; b++) {
                for (c=0; c < 10; c++) {
                    for ( d=0; d < 14; d++) {
                        if(a+b==8&&b+c==10&&d-c==6&&a+d==14) {
                            System.out.println("a=" +a);
                            System.out.println("b=" +b);
                            System.out.println("c=" +c);
                            System.out.println("d=" +d);
                        }
                    }
                }
            }
        }
    }
}
